package com.yichen.codesandbox.maliciousCode;

/**
 * @Author: yichenwu
 * @Date:2024/6/26 9:12
 */

import java.util.ArrayList;
import java.util.List;

/**
 * 恶意代码 - 无限占用内存
 */
public class InfinityMemory {
    public static void main(String[] args) throws InterruptedException {
        List<byte[]> bytes = new ArrayList<>();
        while (true) {
            bytes.add(new byte[10000]);
        }
    }
}
